Skip to content

Bottlerocket Testing Cli#487

Merged
ecpullen merged 1 commit into
bottlerocket-os:developfrom
vyaghras:Bottlerocket_esting_cli
Aug 17, 2022
Merged

Bottlerocket Testing Cli#487
ecpullen merged 1 commit into
bottlerocket-os:developfrom
vyaghras:Bottlerocket_esting_cli

Conversation

@vyaghras

@vyaghras vyaghras commented Jul 22, 2022

Copy link
Copy Markdown
Contributor

Description of changes:
A CLI that can help in writing test case using Bash Script(This CLI takes care of all the interaction with Kubernetes Cluster). This CLI contains following commands

  • test-agent-cli get config
  • test-agent-cli get retries
  • test-agent-cli get secret
  • test-agent-cli send test start
  • test-agent-cli send test done
  • test-agent-cli send result --outcome Pass --passed 1 --failed 0 --skipped 0
  • test-agent-cli send test error -e 'Some error occurred'

Testing done:

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@ecpullen ecpullen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work so far. Here are some initial comments.
edit: you can also combine all all of your changes into a single commit.

Comment thread Cargo.toml Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/Dockerfile Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/src/client.rs Outdated
Comment thread model/src/test.rs Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch from 045e254 to 0480944 Compare July 25, 2022 16:55

@ecpullen ecpullen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more comments. We may want to reconsider some command invocations.
Consider:
test-agent init
test-agent terminate
test-agent send-results --passed 1 or test-agent results --passed 1
test-agent get-secret my-secret or test-agent secret my-secret
test-agent error
test-agent retry-count etc

Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/src/test.rs Outdated
Comment thread agent/test-agent-cli/src/test_done.rs Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 2 times, most recently from 29f3a32 to 95e2ca0 Compare July 27, 2022 16:29
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/src/client.rs Outdated
Comment thread agent/test-agent-cli/src/main.rs Outdated
Comment thread agent/test-agent-cli/src/main.rs Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 3 times, most recently from 3be2916 to b6312ab Compare July 28, 2022 13:24
@vyaghras
vyaghras requested review from ecpullen and etungsten July 28, 2022 13:29
Comment thread agent/test-agent-cli/src/get_secret.rs
Comment thread agent/test-agent-cli/tests/cli_test.rs
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 6 times, most recently from 6143c20 to 18a05b5 Compare August 3, 2022 11:33
Comment thread agent/test-agent/src/k8s_client.rs Outdated
Comment thread agent/test-agent/src/k8s_client.rs Outdated
Comment thread agent/test-agent/src/k8s_client.rs Outdated
Comment thread agent/test-agent/src/k8s_client.rs Outdated
Comment thread agent/test-agent/src/k8s_client.rs Outdated
Comment thread agent/test-agent/src/lib.rs Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 2 times, most recently from 7e0add6 to 841fae5 Compare August 8, 2022 14:05
Comment thread agent/test-agent/src/agent.rs Outdated
Comment thread agent/test-agent-cli/tests/data/deploy_test.yaml Outdated
Comment thread agent/test-agent-cli/tests/cli_test.rs Outdated
Comment thread agent/test-agent/src/k8s_client.rs
Comment thread agent/test-agent-cli/src/main.rs
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 3 times, most recently from bce1ad7 to 31a23be Compare August 10, 2022 13:05
Comment thread agent/test-agent-cli/design/RUNBOOK.md
Comment thread agent/test-agent-cli/design/RUNBOOK.md Outdated
Comment thread agent/test-agent-cli/design/RUNBOOK.md Outdated
Comment thread agent/test-agent-cli/design/RUNBOOK.md Outdated
Comment thread agent/test-agent-cli/design/RUNBOOK.md Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
Comment thread agent/test-agent-cli/src/error.rs Outdated
Comment thread agent/test-agent-cli/src/error.rs Outdated
Comment thread agent/test-agent-cli/src/error.rs Outdated
Comment thread agent/test-agent-cli/src/error.rs Outdated

@ecpullen ecpullen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly nits. It's getting very close.

Comment thread agent/test-agent-cli/src/main.rs Outdated
Comment thread agent/test-agent-cli/src/terminate.rs Outdated
Comment thread agent/test-agent-cli/src/terminate.rs Outdated
Comment thread agent/test-agent-cli/tests/cli_test.rs Outdated
Comment thread design/DESIGN.md Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 7 times, most recently from 044f016 to 02c1a62 Compare August 12, 2022 15:57
Comment thread design/DESIGN.md Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 3 times, most recently from c9e30fa to b3eafd2 Compare August 12, 2022 19:08
@etungsten
etungsten force-pushed the Bottlerocket_esting_cli branch from b3eafd2 to d63ca47 Compare August 12, 2022 22:55
Comment thread agent/test-agent-cli/design/RUNBOOK.md Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch from d63ca47 to 52e5a5a Compare August 15, 2022 17:41
@stmcginnis stmcginnis mentioned this pull request Aug 15, 2022

@ecpullen ecpullen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. 1 more small thing.

Comment thread agent/test-agent-cli/design/RUNBOOK.md
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch 3 times, most recently from e614452 to 85f1d99 Compare August 16, 2022 11:56

@ecpullen ecpullen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@etungsten etungsten left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Just a last few nits.

Comment thread agent/test-agent-cli/design/RUNBOOK.md Outdated
Comment thread agent/test-agent-cli/design/RUNBOOK.md Outdated
Comment thread agent/test-agent-cli/examples/example_test_agent_cli/example-test.sh Outdated
@vyaghras
vyaghras force-pushed the Bottlerocket_esting_cli branch from 85f1d99 to 7335679 Compare August 17, 2022 11:22
Comment thread agent/test-agent-cli/design/RUNBOOK.md

@stmcginnis stmcginnis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but will leave it to @ecpullen or @etungsten to do the actual merge since they have more context on this.

@ecpullen
ecpullen merged commit e4c6d22 into bottlerocket-os:develop Aug 17, 2022
@vyaghras
vyaghras deleted the Bottlerocket_esting_cli branch August 17, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants